package com.wcbtest.oshi.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

@ApiModel(value="内存信息")
@Data
public class Mem implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "内存总量")
    private double memTotal;

    @ApiModelProperty(value = "已用内存")
    private double memUsed;

    @ApiModelProperty(value = "剩余内存")
    private double memFree;

    //public double getMemTotal() {
    //    return NumberUtil.div(memTotal, (1024 * 1024 * 1024), 2);
    //}
    //
    //public double getMemUsed() {
    //    return NumberUtil.div(memUsed, (1024 * 1024 * 1024), 2);
    //}
    //
    //
    //public double getMemFree() {
    //    return NumberUtil.div(memFree, (1024 * 1024 * 1024), 2);
    //}
    //
    //public double getUsage() {
    //    return NumberUtil.mul(NumberUtil.div(memUsed, memTotal, 4), 100);
    //}
}